Skip to content

Comments

v1.9.24 - Refactor: GzipSink: optimized addSlice#139

Merged
gmpassos merged 1 commit intomasterfrom
refactor/gzip-sink-optimized-addslice
Jan 22, 2026
Merged

v1.9.24 - Refactor: GzipSink: optimized addSlice#139
gmpassos merged 1 commit intomasterfrom
refactor/gzip-sink-optimized-addslice

Conversation

@gmpassos
Copy link
Contributor

  • GZipSink:

    • Added override for addSlice to handle partial chunk addition and update _inputLength accordingly.
    • Optimized addSlice to call _gzipSink.close() when isLast is true and full chunk is added.
  • BytesSink:

    • Updated addSlice to use new addPart method for partial chunk addition.
  • BytesBuffer:

    • Added addPart method to add a slice of bytes from a given offset and length, resizing buffer if needed.
    • Refactored add method to delegate to addPart.
    • Improved buffer range setting to support offset and length parameters in addPart.

- `GZipSink`:
  - Added override for `addSlice` to handle partial chunk addition and update `_inputLength` accordingly.
  - Optimized `addSlice` to call `_gzipSink.close()` when `isLast` is true and full chunk is added.

- `BytesSink`:
  - Updated `addSlice` to use new `addPart` method for partial chunk addition.

- `BytesBuffer`:
  - Added `addPart` method to add a slice of bytes from a given offset and length, resizing buffer if needed.
  - Refactored `add` method to delegate to `addPart`.
  - Improved buffer range setting to support offset and length parameters in `addPart`.
@gmpassos gmpassos changed the title v1.9.24 v1.9.24 - Refactor: GzipSink: optimized addSlice Jan 22, 2026
@codecov
Copy link

codecov bot commented Jan 22, 2026

Codecov Report

❌ Patch coverage is 81.25000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.49%. Comparing base (0cd0340) to head (8fd756e).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
lib/src/bones_api_utils_sink.dart 81.25% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #139   +/-   ##
=======================================
  Coverage   65.49%   65.49%           
=======================================
  Files          62       62           
  Lines       20991    21000    +9     
=======================================
+ Hits        13748    13754    +6     
- Misses       7243     7246    +3     
Flag Coverage Δ
unittests 65.49% <81.25%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmpassos gmpassos merged commit 9df436c into master Jan 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant